package com.yfqy.admin.domain.mapper;

import com.yfqy.admin.domain.dto.attribute.AttributeDTO;
import com.yfqy.admin.domain.entity.Attribute;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface AttributeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Attribute record);

    int insertSelective(Attribute record);

    Attribute selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Attribute record);

    int updateByPrimaryKey(Attribute record);

    List<AttributeDTO> selectListByNameAndType(@Param("name") String name, @Param("type") Byte type);

    Attribute selectOneByName(@Param("name") String name);

    List<Attribute> selectByIds(@Param("ids") Set<Long> ids);

    List<AttributeDTO> selectByCategoryId(@Param("id") Long id);
}